package com.sts.config;

import jakarta.annotation.PostConstruct;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

import java.io.IOException;
import java.nio.file.Files;

@Component
@RequiredArgsConstructor
public class UploadDirInitializer {
    private final UploadProperties props;

    @PostConstruct
    public void init() throws IOException {
        Files.createDirectories(props.getPath());
    }
}